#include<stdio.h>
#include<math.h>
struct stu{
	int num;
	float gra;
};
int main()
{
	int i,n;
	float sum = 0.0,ave = 0.0;
	scanf("%d",&n);
	struct stu dent[n];
	scanf("%d",&dent[0].num);
	for(i=0;i<n;i++)
	  dent[i].num = dent[0].num + i;
	for(i=0;i<n;i++)
	{
		scanf("%f",&dent[i].gra);
		sum += dent[i].gra;
	}
	ave = sum/n;
	printf("%.1f\n",ave);
	float min =  fabs(dent[0].gra - ave);
	for(i=1;i<n;i++)
		if(fabs(dent[i].gra - ave)<min)
			min = fabs(dent[i].gra-ave);
 	for(i=0;i<n;i++)
		if(fabs(dent[i].gra - ave)==min)
			printf("%d\n",dent[i].num);
	return 0;
} 
